<template>
  <div class="">
    <a-form :form="formData" :label-col="{ span: 5 }" :wrapper-col="{ span: 12 }">
      <a-row>
        <template v-for="formItem in newFormList" ::key="formItem.key">
          <a-col v-if="!formItem.isHidden">
            <a-form-item :label="formItem.label" :name="formItem.key">
              <a-input
                v-if="formItem.type == 'input'"
                :placeholder="formItem.placeholder || `请输入${formItem.label}`"
                :allowClear="formItem.canClear"
                :style="formItem.style || defaultStyle"
                :disabled="formItem.disabled"
                :maxlength="formItem.maxlength"
                :size="formItem.size || 'middle'"
              ></a-input>
            </a-form-item>
          </a-col>
        </template>
      </a-row>
    </a-form>
  </div>
</template>
<script>
export default {
  name: "FormCom",
  data() {
    return {
      formData: {},
      defaultStyle: {},
    };
  },
  props: {
    formList: {
      type: Array,
      default: [],
    },
  },
  computed: {
    newFormList() {
      return this.formList;
    },
  },
  methods: {},
  created() {},
  mounted() {},
};
</script>
<style lang="less" scoped></style>
